package com.feifan.controller;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.feifan.annotation.MyAutowired;
import com.feifan.annotation.MyController;
import com.feifan.annotation.MyRequestMapping;
import com.feifan.service.UserService;

@MyController
@MyRequestMapping("my")
public class UserController extends BaseController {

    @MyAutowired
    private UserService UserService;

    @MyRequestMapping("my")
    public String getMy(HttpServletRequest req, HttpServletResponse resp) throws Exception {
        System.out.println("进来了" + req.getRequestURL());
        UserService.printf();
        // resp.setHeader("content-type", "text/html;charset=utf-8");
        resp.getWriter().write("恭喜你访问到控制层了>>>>" + req.getParameter("name"));
        return "my";
    }
}
